package com.service;
import com.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserService {

	
	/**
	 * 用户登录
	 * @param userCode
	 * @param userPassword
	 * @return
	 */
	public User login(String userCode, String userPassword);


	/**
	 * 增加用户信息
	 */
	public int add(User user)throws Exception;


	/**
	 * 通过条件查询-userList
	 */
	public List<User> getUserList(@Param("userName") String userName, @Param("userRole") int userRole, @Param("currentPageNo") int currentPageNo, @Param("pageSize") int pageSize)throws Exception;
	/**
	 * 通过条件查询-用户表记录数
	 */
	public int getUserCount(@Param("userName") String userName, @Param("userRole") int userRole)throws Exception;

	/**
	 * 根据userCode查询出User
	 * @param userCode
	 * @return
	 */
	public User selectUserCodeExist(String userCode);

	/**
	 * 通过userId删除user
	 */
	public int deleteUserById(@Param("delId") Integer delId)throws Exception;


	/**
	 * 通过userId获取user
	 */
	public User getUserById(@Param("id") String id)throws Exception;

	/**
	 * 修改用户信息
	 */
	public int modify(User user)throws Exception;


	/**
	 * 修改当前用户密码
	 */
	public int updatePwd(@Param("id") int id,@Param("pwd") String pwd)throws Exception;
}
